package com.feng.zhihao.apigeteway.entity;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * ChannelInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "CHANNEL_INFO")

public class ChannelInfo implements java.io.Serializable {

	// Fields

	private String channelId;
	private String channelName;
	private Integer channelState;
	private Set<UserInfo> userInfos = new HashSet<UserInfo>(0);
	private Set<ChannelProject> channelProjects = new HashSet<ChannelProject>(0);
	private Set<ChannelInterface> channelInterfaces = new HashSet<ChannelInterface>(0);
	private Set<ChannelInterfaceCase> channelInterfaceCases = new HashSet<ChannelInterfaceCase>(0);

	// Constructors

	/** default constructor */
	public ChannelInfo() {
	}

	/** minimal constructor */
	public ChannelInfo(String channelId) {
		this.channelId = channelId;
	}

	/** full constructor */
	public ChannelInfo(String channelId, String channelName, Integer channelState, Set<UserInfo> userInfos,
			Set<ChannelProject> channelProjects, Set<ChannelInterface> channelInterfaces,
			Set<ChannelInterfaceCase> channelInterfaceCases) {
		this.channelId = channelId;
		this.channelName = channelName;
		this.channelState = channelState;
		this.userInfos = userInfos;
		this.channelProjects = channelProjects;
		this.channelInterfaces = channelInterfaces;
		this.channelInterfaceCases = channelInterfaceCases;
	}

	// Property accessors
	@Id

	@Column(name = "CHANNEL_ID", unique = true, nullable = false, length = 36)

	public String getChannelId() {
		return this.channelId;
	}

	public void setChannelId(String channelId) {
		this.channelId = channelId;
	}

	@Column(name = "CHANNEL_NAME", length = 512)

	public String getChannelName() {
		return this.channelName;
	}

	public void setChannelName(String channelName) {
		this.channelName = channelName;
	}

	@Column(name = "CHANNEL_STATE")

	public Integer getChannelState() {
		return this.channelState;
	}

	public void setChannelState(Integer channelState) {
		this.channelState = channelState;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "channelInfo")

	public Set<UserInfo> getUserInfos() {
		return this.userInfos;
	}

	public void setUserInfos(Set<UserInfo> userInfos) {
		this.userInfos = userInfos;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "channelInfo")

	public Set<ChannelProject> getChannelProjects() {
		return this.channelProjects;
	}

	public void setChannelProjects(Set<ChannelProject> channelProjects) {
		this.channelProjects = channelProjects;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "channelInfo")

	public Set<ChannelInterface> getChannelInterfaces() {
		return this.channelInterfaces;
	}

	public void setChannelInterfaces(Set<ChannelInterface> channelInterfaces) {
		this.channelInterfaces = channelInterfaces;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "channelInfo")

	public Set<ChannelInterfaceCase> getChannelInterfaceCases() {
		return this.channelInterfaceCases;
	}

	public void setChannelInterfaceCases(Set<ChannelInterfaceCase> channelInterfaceCases) {
		this.channelInterfaceCases = channelInterfaceCases;
	}

}